package com.apes.bi.model;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.Name;
import com.apes.framework.jpa.comment.Comment;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;
import javax.persistence.*;

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = Widget.CONST_TABLE_NAME)

public class Widget extends Model {
    public static final String CONST_TABLE_NAME = "bi_widget";

    @Id
    @Comment("组件编码")
    @Column(name = "id", length = 60)
    private String id;

    @Name
    @Comment("组件名称")
    @Column(name = "name", nullable = false, length = 60)
    private String name;

}
